<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>
    <div class="cf">
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="sleft">
                <input type="text" class="start_time text" name="start_time" placeholder="请选择开始时间" value="{:I('start_time')}" readonly>
                <input type="text" class="end_time text" name="end_time" placeholder="请选择结束时间" value="{:I('end_time')}" readonly>
                
                <input type="text" class="search-input" name="mobile" value="{:I('mobile')}" placeholder="请输入收货手机号">
                <input type="text" class="search-input" name="order_sn" value="{:I('order_sn')}" placeholder="请输入订单号">

                <select name="iid">
                    <option value="0">请选择机构</option>
                    <volist name="institution_list" id="vo">
                        <option value="{$vo.id}" <if condition="$vo['id'] == I('iid')">selected</if>>{$vo.name}</option>
                    </volist>
                </select>
            </div>
            <a class="sch-btn" href="javascript:;" id="search" url="{:U('videoOrderList')}"><i class="btn-search"></i></a>
        </div>

    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table>
            <thead>
            <tr>
                <th>ID</th>
                <th>订单号</th>
                <th>机构名称</th>
                <th>点播课名称</th>
                <th>购买人姓名</th>
                <th>购买人手机号</th>
                <th>支付金额</th>
                <th>支付时间</th>
<!--                <th>操作</th>-->
            </tr>
            </thead>
            <tbody>
            <notempty name="_list">
                <volist name="_list" id="vo">
                    <tr>

                        <td>{$vo.id}</td>
                        <td>{$vo.order_sn}</td>
                        <td>{$vo.institution_name}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.username}</td>
                        <td>{$vo.mobile}</td>
                        <td>{$vo.pay_price}</td>
                        <td>{$vo.pay_time|time_format}</td>
<!--                        <td>
                            <a href="{:U('upPractice',array('id'=>$vo['id']))}" class="authorize">编辑</a> |
                            <a href="{:U('delPractice',array('id'=>$vo['id']))}" class="authorize">删除</a>
                        </td>-->
                    </tr>
                </volist>
                <else/>
                <td colspan="8" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <script type="text/javascript">
        $(function() {
            $('.start_time').datetimepicker({
                format: 'yyyy-mm-dd hh:ii',
                language: "zh-CN",
                minView: 0,
                minuteStep: 1,
                autoclose: true
            });
            $('.end_time').datetimepicker({
                format: 'yyyy-mm-dd hh:ii',
                language: "zh-CN",
                minView: 0,
                minuteStep: 1,
                autoclose: true
            });
        })
        
        //搜索功能
        $('#search').click(function(){
            var url = $(this).attr('url').replace('.html', '');
            var query  = $('.search-form').find('input').serialize();
            var squery = $('.search-form').find('select').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            query = query.replace(/^&/g,'');
            squery=squery.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            squery=squery.replace(/^&/g,'');
            if( url.indexOf('?')>0 ){
                url += '&' + query+'&'+squery;
            }else{
                url += '?' + query+'&'+squery;
            }
            window.location.href = url;
        });

        //导航高亮
        highlight_subnav('{:U("Manage/videoOrderList")}');
    </script>
</block>